﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms; 

namespace CourseArraging.Frm.jcxx
{
    /// <summary>
    /// 版权所有
    /// 石世特@温州医学院 sst330381@gmail.com
    /// </summary> 
    public partial class FrmJcxxBase : FrmToolbarBase
    {
        protected BasicService.BasicServiceClient otherDao = new BasicService.BasicServiceClient();
        public FrmJcxxBase()
        {
            InitializeComponent();
            this.tstxt_item.KeyPress += new KeyPressEventHandler(tstxt_item_KeyPress);
            this.dataGridView1.CellDoubleClick += new DataGridViewCellEventHandler(dataGridView1_CellDoubleClick);
        }

        #region 事件

        void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex < 0) return;
            newForm(sender,e);
        }

        private void toolStripButton1_Click(object sender, EventArgs e)
        {
            tsb_save_fun();
        }

        void tstxt_item_KeyPress(object sender, KeyPressEventArgs e)
        {
            if(e.KeyChar==(char)Keys.Enter)
            {
                toolStripButton1_Click(new object(), new EventArgs());
            }
        }

        #endregion

        #region 抽象方法

        public virtual void showData()
        {

        }

        public virtual void newForm(object sender, DataGridViewCellEventArgs e)
        { 
            
        }

        #endregion
    }
}
